package Interfaces;



import javax.swing.ButtonGroup;
import javax.swing.JPanel;
import javax.swing.JFrame;
import java.awt.Rectangle;
import javax.swing.JTabbedPane;
import java.awt.Font;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import java.awt.GridBagLayout;
import javax.swing.BorderFactory;
import javax.swing.border.TitledBorder;
import java.awt.Color;
import javax.swing.JComboBox;
import javax.swing.JCheckBox;
import java.awt.event.KeyEvent;
import javax.swing.JToggleButton;
import javax.swing.JRadioButtonMenuItem;
import javax.swing.JCheckBoxMenuItem;
import javax.swing.JMenu;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.GridBagConstraints;
import javax.swing.JLabel;

public class VentanaAdministrador extends JFrame {

	private static final long serialVersionUID = 1L;
	private JTabbedPane jTabbedPane = null;
	private JPanel jPanel = null;
	private JPanel jPanel4 = null;
	private JPanel jPanel5 = null;
	private JPanel jPanel1 = null;
	private JCheckBox jCheckBox = null;
	private JCheckBox jCheckBox1 = null;
	private JCheckBox jCheckBox2 = null;
	private JButton aceptarEmp = null;
	private JPanel jPanel2 = null;
	
	ButtonGroup bt = new javax.swing.ButtonGroup();  //  @jve:decl-index=0:
	ButtonGroup emple = new javax.swing.ButtonGroup();
	ButtonGroup produ = new javax.swing.ButtonGroup();//  @jve:decl-index=0:
	private JCheckBox jCheckBox3 = null;
	private JCheckBox registrarCliente = null;
	private JCheckBox eliminarCliente = null;
	private JCheckBox actualizarDatos = null;
	private JCheckBox listarCliente = null;
	private JButton aceptar1 = null;
	private JPanel Insumos = null;
	private JPanel jPanel3 = null;
	private JPanel jPanel6 = null;
	private JCheckBox RegProducto = null;
	private JCheckBox EliProducto = null;
	private JCheckBox ActualizarProducto = null;
	private JCheckBox LisProductos = null;
	private JButton Aceptar3 = null;
	
	
	
	public ButtonGroup getProdu() {
		return produ;
	}


	public void setProdu(ButtonGroup produ) {
		this.produ = produ;
	}


	public ButtonGroup getBt() {
		return bt;
	}

	
	public ButtonGroup getEmple() {
		return bt;
	}
	public void setBt(ButtonGroup bt) {
		this.bt = bt;
	}

	/**
	 * This is the default constructor
	 */
	public VentanaAdministrador() {
		super();
		initialize();
	}

	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize() {
		this.setSize(659, 537);
		this.setContentPane(getJTabbedPane());
		this.setTitle("Administracion");
	}

	/**
	 * This method initializes jTabbedPane	
	 * 	
	 * @return javax.swing.JTabbedPane	
	 */
	private JTabbedPane getJTabbedPane() {
		if (jTabbedPane == null) {
			jTabbedPane = new JTabbedPane();
			jTabbedPane.setName("Gestion Empleados");
			jTabbedPane.addTab("Empleados", new ImageIcon(getClass().getResource("/imagenes/Administrador.jpg")), getJPanel(), null);
			jTabbedPane.addTab("Clientes", new ImageIcon(getClass().getResource("/imagenes/clientes.jpg")), getJPanel4(), null);
			jTabbedPane.addTab("Productos", new ImageIcon(getClass().getResource("/imagenes/productos.jpg")), getJPanel5(), null);
			jTabbedPane.addTab("Insumos", new ImageIcon(getClass().getResource("/imagenes/Insumos.jpg")), getInsumos(), null);
		}
		return jTabbedPane;
	}

	/**
	 * This method initializes jPanel	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel() {
		if (jPanel == null) {
			jPanel = new JPanel();
			jPanel.setLayout(null);
			jPanel.add(getJPanel1(), null);
		}
		return jPanel;
	}

	/**
	 * This method initializes jPanel4	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel4() {
		if (jPanel4 == null) {
			jPanel4 = new JPanel();
			jPanel4.setLayout(null);
			jPanel4.add(getJPanel2(), null);
		}
		return jPanel4;
	}

	/**
	 * This method initializes jPanel5	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel5() {
		if (jPanel5 == null) {
			jPanel5 = new JPanel();
			jPanel5.setLayout(null);
			jPanel5.add(getJPanel6(), null);
		}
		return jPanel5;
	}

	/**
	 * This method initializes jPanel1	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel1() {
		if (jPanel1 == null) {
			jPanel1 = new JPanel();
			jPanel1.setLayout(null);
			jPanel1.setBounds(new Rectangle(44, 43, 302, 277));
			jPanel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, Color.orange), "Gestio de Empleados", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Dialog", Font.BOLD, 12), Color.black));
			jPanel1.add(getJCheckBox(), null);
			jPanel1.add(getJCheckBox1(), null);
			jPanel1.add(getJCheckBox2(), null);
			jPanel1.add(getAceptarEmp(), null);
			jPanel1.add(getJCheckBox3(), null);
			getBt().add(jCheckBox);
			getBt().add(jCheckBox1);
			getBt().add(jCheckBox2);
			getBt().add(jCheckBox3);
			
		
			
		}
		return jPanel1;
	}
	
	
	
	
	
	
	
	/**
	 * This method initializes jCheckBox	
	 * 	
	 * @return javax.swing.JCheckBox	
	 */
	private JCheckBox getJCheckBox() {
		if (jCheckBox == null) {
			jCheckBox = new JCheckBox();
			jCheckBox.setBounds(new Rectangle(34, 62, 196, 14));
			jCheckBox.setMnemonic(KeyEvent.VK_UNDEFINED);
			jCheckBox.setRolloverEnabled(false);
			jCheckBox.setText("      Agregar Empleado");
		}
		return jCheckBox;
	}

	/**
	 * This method initializes jCheckBox1	
	 * 	
	 * @return javax.swing.JCheckBox	
	 */
	private JCheckBox getJCheckBox1() {
		if (jCheckBox1 == null) {
			jCheckBox1 = new JCheckBox();
			jCheckBox1.setBounds(new Rectangle(33, 98, 165, 21));
			jCheckBox1.setText("      Retirar Empleado");
		}
		return jCheckBox1;
	}

	/**
	 * This method initializes jCheckBox2	
	 * 	
	 * @return javax.swing.JCheckBox	
	 */
	private JCheckBox getJCheckBox2() {
		if (jCheckBox2 == null) {
			jCheckBox2 = new JCheckBox();
			jCheckBox2.setBounds(new Rectangle(33, 137, 146, 21));
			jCheckBox2.setText("      Actualizar Datos");
		}
		return jCheckBox2;
	}

	/**
	 * This method initializes aceptarEmp	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getAceptarEmp() {
		if (aceptarEmp == null) {
			aceptarEmp = new JButton();
			aceptarEmp.setBounds(new Rectangle(100, 229, 91, 26));
			aceptarEmp.setText("Aceptar");
			
			aceptarEmp.addActionListener(new ActionListener(){
				
				public void actionPerformed( ActionEvent arg0 ){
					
					
					if(jCheckBox.isSelected()){
						
						VentanaEmpleado ven =new VentanaEmpleado();
						ven.setVisible(true);
						
						
					}
					
                   if(jCheckBox1.isSelected()){
						
						RetirarEmpleado re =new RetirarEmpleado();
						re.setVisible(true);
						
						
					}
					
                   if(jCheckBox2.isSelected()){
						
						VentanaActualizar act =new VentanaActualizar();
						act.setVisible(true);
						
						
					}
					
					
                   if(jCheckBox3.isSelected()){
						
						VentanaEmpleados act =new VentanaEmpleados();
						act.setVisible(true);
						
						
					}
					
					
					
					
					
					
					
				}
				
				
				
			});
			
			
			
			
			
		}
		return aceptarEmp;
	}

	/**
	 * This method initializes jPanel2	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel2() {
		if (jPanel2 == null) {
			jPanel2 = new JPanel();
			jPanel2.setLayout(null);
			jPanel2.setBounds(new Rectangle(48, 40, 286, 308));
			jPanel2.setBorder(BorderFactory.createTitledBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, Color.orange), "Gestion de Clientes", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Dialog", Font.BOLD, 12), new Color(51, 51, 51)));
			jPanel2.add(getRegistrarCliente(), null);
			jPanel2.add(getEliminarCliente(), null);
			jPanel2.add(getActualizarDatos(), null);
			jPanel2.add(getListarCliente(), null);
			jPanel2.add(getAceptar1(), null);
			
			getEmple().add(registrarCliente);
			getEmple().add(listarCliente);
			getEmple().add(eliminarCliente);
			getEmple().add(actualizarDatos);
			
			
			
		}
		return jPanel2;
	}



	/**
	 * This method initializes jCheckBox3	
	 * 	
	 * @return javax.swing.JCheckBox	
	 */
	private JCheckBox getJCheckBox3() {
		if (jCheckBox3 == null) {
			jCheckBox3 = new JCheckBox();
			jCheckBox3.setBounds(new Rectangle(34, 177, 153, 21));
			jCheckBox3.setText("      Listar Empleados");
		}
		return jCheckBox3;
	}



	/**
	 * This method initializes registrarCliente	
	 * 	
	 * @return javax.swing.JCheckBox	
	 */
	private JCheckBox getRegistrarCliente() {
		if (registrarCliente == null) {
			registrarCliente = new JCheckBox();
			registrarCliente.setBounds(new Rectangle(45, 49, 167, 21));
			registrarCliente.setText("      Registrar Cliente");
		}
		return registrarCliente;
	}



	/**
	 * This method initializes eliminarCliente	
	 * 	
	 * @return javax.swing.JCheckBox	
	 */
	private JCheckBox getEliminarCliente() {
		if (eliminarCliente == null) {
			eliminarCliente = new JCheckBox();
			eliminarCliente.setBounds(new Rectangle(45, 89, 145, 21));
			eliminarCliente.setText("      Retirar Cliente");
		}
		return eliminarCliente;
	}



	/**
	 * This method initializes actualizarDatos	
	 * 	
	 * @return javax.swing.JCheckBox	
	 */
	private JCheckBox getActualizarDatos() {
		if (actualizarDatos == null) {
			actualizarDatos = new JCheckBox();
			actualizarDatos.setBounds(new Rectangle(45, 135, 169, 21));
			actualizarDatos.setText("      Actualizar Datos");
		}
		return actualizarDatos;
	}



	/**
	 * This method initializes listarCliente	
	 * 	
	 * @return javax.swing.JCheckBox	
	 */
	private JCheckBox getListarCliente() {
		if (listarCliente == null) {
			listarCliente = new JCheckBox();
			listarCliente.setBounds(new Rectangle(44, 178, 170, 21));
			listarCliente.setText("       Listar Cliente");
		}
		return listarCliente;
	}



	/**
	 * This method initializes aceptar1	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getAceptar1() {
		if (aceptar1 == null) {
			aceptar1 = new JButton();
			aceptar1.setBounds(new Rectangle(78, 240, 84, 21));
			aceptar1.setText("Aceptar");
		}
		return aceptar1;
	}


	/**
	 * This method initializes Insumos	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getInsumos() {
		if (Insumos == null) {
			Insumos = new JPanel();
			Insumos.setLayout(null);
			Insumos.add(getJPanel3(), null);
		}
		return Insumos;
	}


	/**
	 * This method initializes jPanel3	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel3() {
		if (jPanel3 == null) {
			jPanel3 = new JPanel();
			jPanel3.setLayout(null);
			jPanel3.setBounds(new Rectangle(27, 48, 283, 294));
			jPanel3.setBorder(BorderFactory.createTitledBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, Color.orange), "Insumos del Asadero", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Dialog", Font.BOLD, 12), new Color(51, 51, 51)));
		}
		return jPanel3;
	}


	/**
	 * This method initializes jPanel6	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel6() {
		if (jPanel6 == null) {
			jPanel6 = new JPanel();
			jPanel6.setLayout(null);
			jPanel6.setBounds(new Rectangle(50, 45, 288, 300));
			jPanel6.setBorder(BorderFactory.createTitledBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, Color.orange), "Gestion Productos", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Dialog", Font.BOLD, 12), new Color(51, 51, 51)));
			jPanel6.add(getRegProducto(), null);
			jPanel6.add(getEliProducto(), null);
			jPanel6.add(getActualizarProducto(), null);
			jPanel6.add(getLisProductos(), null);
			jPanel6.add(getAceptar3(), null);
			
			
			getProdu().add(ActualizarProducto);
			getProdu().add(EliProducto);
			getProdu().add(LisProductos);
			getProdu().add(RegProducto);
		}
		return jPanel6;
	}


	/**
	 * This method initializes RegProducto	
	 * 	
	 * @return javax.swing.JCheckBox	
	 */
	private JCheckBox getRegProducto() {
		if (RegProducto == null) {
			RegProducto = new JCheckBox();
			RegProducto.setBounds(new Rectangle(32, 54, 177, 21));
			RegProducto.setText("    Registrar Producto");
		}
		return RegProducto;
	}


	/**
	 * This method initializes EliProducto	
	 * 	
	 * @return javax.swing.JCheckBox	
	 */
	private JCheckBox getEliProducto() {
		if (EliProducto == null) {
			EliProducto = new JCheckBox();
			EliProducto.setBounds(new Rectangle(31, 102, 143, 21));
			EliProducto.setText("    Retirar Producto");
		}
		return EliProducto;
	}


	/**
	 * This method initializes ActualizarProducto	
	 * 	
	 * @return javax.swing.JCheckBox	
	 */
	private JCheckBox getActualizarProducto() {
		if (ActualizarProducto == null) {
			ActualizarProducto = new JCheckBox();
			ActualizarProducto.setBounds(new Rectangle(30, 148, 184, 21));
			ActualizarProducto.setText("    Actualizar  Producto");
		}
		return ActualizarProducto;
	}


	/**
	 * This method initializes LisProductos	
	 * 	
	 * @return javax.swing.JCheckBox	
	 */
	private JCheckBox getLisProductos() {
		if (LisProductos == null) {
			LisProductos = new JCheckBox();
			LisProductos.setBounds(new Rectangle(31, 191, 155, 21));
			LisProductos.setText("    Listar Productos");
		}
		return LisProductos;
	}


	/**
	 * This method initializes Aceptar3	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getAceptar3() {
		if (Aceptar3 == null) {
			Aceptar3 = new JButton();
			Aceptar3.setBounds(new Rectangle(74, 259, 90, 24));
			Aceptar3.setText("Aceptar");
			
			
			
			
			
			
			
			
			
			
			
			
		}
		return Aceptar3;
	}

}  //  @jve:decl-index=0:visual-constraint="96,110"
